﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="UserAppointments.aspx.cs" Inherits="UserAppointments" Title="User Appointments" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <title>Work Organizer - List Groups</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true">
    </asp:ScriptManager>
    <table style="width: 100%">
        <tr>
            <td align="center" style="width: 90%">
                <asp:Label ID="lblAppnts" runat="server" Text="User Appointments" Font-Bold="True"
                    Font-Size="X-Large" ForeColor="#3333FF"></asp:Label>
            </td>
            <td align="center" style="width: 10%">
                <table>
                    <tr>
                        <td>
                            <asp:ImageButton runat="server" ImageUrl="~/images/csv.gif" ID="imgBtnDownload" OnClick="imgBtnDownload_Click" />
                        </td>
                        <td>
                            <input type="image" src="images/print_icon.gif" alt="Download" onclick="window.print();" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
        <td>
        <span style="font-family: Arial, Helvetica, sans-serif; font-size: large; font-weight: normal; color: #008000"> You can select any one of the below filters and click on the corresponding filter.</span>
        <br />
        <br />
        </td></tr>
        <tr>
            <td colspan="2">
                <table>
                    <tr>
                        <td align="right">
                            Group:
                        </td>
                        <td align="left">
                            <asp:DropDownList Width="100px" ID="addGroups" runat="server" AutoPostBack="true"
                                OnSelectedIndexChanged="addGroups_SelectedIndexChanged">
                            </asp:DropDownList>
                        </td>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Button ID="btnFilterByGroup" runat="server" Text="Filter by Group" Width="100px" OnClick="btnFilterByGroup_Click" />
                        </td>
                        <td align="right">
                            Users:&nbsp;&nbsp;
                        </td>
                        <td align="left">
                            <asp:DropDownList Width="100px" ID="addUsers" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Button ID="btnFilterByUser" runat="server" Text="Filter by User" Width="100px"  OnClick="btnFilterByUser_Click" />
                        </td>
                        <td align="right">
                            <asp:Label ID="Label1" runat="server">From :</asp:Label>
                        </td>
                        <td valign="top" align="left">
                            <asp:TextBox Width="70px" runat="server" ID="txtFrom" />
                            <AjaxToolkit:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="txtFrom" />
                        </td>
                        <td align="right" valign="top">
                            <asp:Label ID="Label2" runat="server">To :</asp:Label>
                        </td>
                        <td valign="top" align="left">
                            <asp:TextBox Width="70px" runat="server" ID="txtTo" />
                            <AjaxToolkit:CalendarExtender runat="server" ID="CalendarExtender2" TargetControlID="txtTo" />
                        </td>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Button ID="btnFilterByDate" runat="server" Text="Filter by Date" OnClick="btnFilterByDate_Click" Width="100px" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <%--<tr>
            <td colspan="2">
                <table>
                    <tr>
                        <td align="right">
                            Users:&nbsp;&nbsp;
                        </td>
                        <td align="left">
                            <asp:DropDownList Width="120px" ID="addUsers" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Button ID="btnFilterByUser" runat="server" Text="Filter by User" Width="100px"  OnClick="btnFilterByUser_Click" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <table>
                    <tr>
                        <td align="right">
                            <asp:Label ID="lblFrom" runat="server">From :</asp:Label>
                        </td>
                        <td valign="top" align="left">
                            <asp:TextBox Width="120px" runat="server" ID="txtFrom" />
                            <AjaxToolkit:CalendarExtender runat="server" ID="calFrom" TargetControlID="txtFrom" />
                        </td>
                        <td align="right" valign="top">
                            <asp:Label ID="lblTo" runat="server">To :</asp:Label>
                        </td>
                        <td valign="top" align="left">
                            <asp:TextBox Width="120px" runat="server" ID="txtTo" />
                            <AjaxToolkit:CalendarExtender runat="server" ID="calTo" TargetControlID="txtTo" />
                        </td>
                        <td align="center" colspan="2" style="color: Red;">
                            <asp:Button ID="btnGo" runat="server" Text="Filter by Date" OnClick="btnFilterByDate_Click" Width="100px" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>--%>
        <tr>
            <td align="center" colspan="2">
                <br />
                <asp:DataGrid ID="Grid" runat="server" PageSize="5" DataKeyField="title" AutoGenerateColumns="False"
                    CellPadding="4" ForeColor="#333333" GridLines="None" Width="95%" AllowSorting="true">
                    <Columns>
                        <asp:TemplateColumn HeaderText="S.No">
                            <ItemTemplate>
                                <span>
                                    <%# Container.ItemIndex+1 %></span>
                            </ItemTemplate>
                        </asp:TemplateColumn>
                        <asp:BoundColumn HeaderText="Appointment" DataField="title"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Company" DataField="companyname"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Group" DataField="groupname"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="User(s)" DataField="username"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="Start Time" DataField="start" ReadOnly="true"></asp:BoundColumn>
                        <asp:BoundColumn HeaderText="End Time" DataField="end" ReadOnly="true"></asp:BoundColumn>
                    </Columns>
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <EditItemStyle BackColor="#999999" />
                    <SelectedItemStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                    <AlternatingItemStyle BackColor="White" ForeColor="#284775" />
                    <ItemStyle BackColor="#F7F6F3" ForeColor="#333333" />
                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                </asp:DataGrid>
            </td>
        </tr>
        <tr>
            <td>
                <br />
                <br />
                <br />
                <br />
                <br />
            </td>
        </tr>
    </table>
</asp:Content>
